<?php if (!defined('THINK_PATH')) exit();?><table class="table-grid">
    <thead>
        <tr>
            <th class="col-idx"><a href="#" class="btn-arrowstop lnk-multiple" onclick="">&nbsp;</a></th>
    <?php if($isSuperAdmin): ?><th>租户ID</th><?php endif; ?>
    <th>商品名称</th>
    <th>商品条码</th>
    <th>销售价格</th>
    <th>商品库存</th>
    <th>预警库存</th>
    <th>商品分类</th>
    <th>状态</th>
    <th>创建时间</th>
    <th>操作</th>
</tr>
</thead>
<tbody>
<?php if(is_array($list)): foreach($list as $key=>$vo): if(is_numeric($key)): $key=$key+1; endif; ?><tr data-key="<?php echo ($vo["id"]); ?>">
        <td><?php echo ($key); ?></td>
    <?php if($isSuperAdmin): ?><td><?php echo ($vo["siteID"]); ?></td><?php endif; ?>
    <td><?php echo ($vo["product_name"]); ?></td>
    <td><?php echo ($vo["barcode"]); ?></td>
    <td><?php echo ($vo["price"]); ?></td>
    <td><?php echo ($vo["stock"]); ?></td>
    <td><?php echo ($vo["warning_stock"]); ?></td>
    <td><?php echo ($vo["catalog_name"]); ?></td>
    <td><?php echo (sofn_get_state_text('PRODUCT-SALE-STATE',$vo["state"])); ?></td>
    <td><?php echo ($vo["createdTime"]); ?></td>
    <td class="no-padding">
    <?php if($upr['product_edit']): ?><a href="<?php echo U('Product/product_edit','id='.$vo['id']);?>" class="btn-edit lnk-edit">编辑</a><?php endif; ?>
    <?php if($upr['盘点调仓']): ?><a href="<?php echo U('Product/inventory_edit','id='.$vo['id']);?>" class="btn-edit lnk-edit">盘点</a><?php endif; ?>
    <a href="<?php echo U('Product/product_log_list','id='.$vo['id']);?>" class="btn-edit lnk-edit">日志</a>
    <?php if($upr['product_delete']): ?><a href="<?php echo U('Product/product_delete','id='.$vo['id']);?>" class="btn-minus lnk-confirm">删除</a><?php endif; ?>
    </td></tr><?php endforeach; endif; ?>
</tbody>
</table>
<?php echo ($pager); ?>